<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="<%=path %>/static/css/css.css?1" />
<link rel="stylesheet" type="text/css" href="<%=path %>/static/jquery-ui/jquery-ui.min.css" />
<script type="text/javascript" src="<%=path %>/static/js/json2.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/jquery.js"></script>
<script type="text/javascript" src="<%=path %>/static/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="<%=path %>/static/layer/layer.js"></script>
<script type="text/javascript" src="<%=path %>/static/utf8-jsp/ueditor.config.js"></script>
<script type="text/javascript" src="<%=path %>/static/utf8-jsp/ueditor.all.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/gridview.js?v=1"></script>
<script type="text/javascript" src="<%=path %>/static/js/formview.js?v=1"></script>
<script type="text/javascript" src="<%=path %>/static/js/tool.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/validate.js"></script>

<SCRIPT type="text/javascript">
  $.ajaxSetup({
     async: false
  });
    <!--
    var formSetting = {
    		po:'QhDemo',
    		title:"",
    		formid:"formedit",
    		hiddens:["id","note","createUser","createDateTime","modifyUser","modifyDateTime","state"],
    	fields:[
             [
                {tdwidth:100,title:"名称",field:"名称",type:"text",name:"name",width:592,datatype:"Require",msg:"请输入名称！",colspan:3}
             ],
             [
                {title:"安装包",type:"uploadfile",name:"apk",width:592,colspan:3}
             ],
             [
                {title:"图片",field:"图片",type:"uploadimg",name:"picUrl1",width:260,colspan:3}
             ],
             [
                {title:"应用截图1",field:"应用截图1",type:"uploadimg",name:"picUrl2",width:260,colspan:3}
             ],
             [
                {title:"应用截图2",field:"应用截图2",type:"uploadimg",name:"picUrl3",width:260,colspan:3}
             ],
    		 [
                {title:"大小（M）",field:"大小（M）",type:"text",name:"size",width:150,colspan:3}
             ],
             [
                {title:"价格",field:"价格",type:"text",name:"price",width:150,colspan:3}
             ],
             [
                {title:"简介",field:"简介",type:"text",name:"summary",width:758,colspan:3}
             ],
             [
                {title:"任务说明",field:"任务说明",type:"text",name:"instruction",width:758,colspan:3}
             ],
             [
                {title:"应该描述",type:"div",name:"editDemoNote",width:800,colspan:3}
             ]
             ],
		toolbar:{align:'right',buttons:[
		     {
                  id:'return',
                  title:'返回',
                  cssclass:'btnyellow',
                  handlers:{
                       click: function(){
                            location.href="/qh/public/common/r2.htmls?page=demo/demo_list";
                       }
                  }
             },
		                 			  {
		                 			    	 id:'save',
		                 			    	 title:'提交',
		                 			    	 handlers:{
		                 			    		 click: function(){
		                 			    			 if(!Validator.Validate(document.getElementById('formedit'),0)){
		                 			    			    return;
		                 			    			 }
		                 			    			 form.save(function(ret) {
                                                         if (ret == -1) {
                                                             layer.alert("数据保存失败，请重试！");
                                                         } else {
                                                             layer.msg("数据已保存！");
                                                             setTimeout("location.href='/qh/public/common/r2.htmls?page=demo/demo_list'",2000);
                                                         }
                                                     });
		                 			    		 }
		                 			    	 }
		                 			     }
		                 			 ]}
    }

	var form;
    $(document).ready(function(){
    	form = new FormView("formview",formSetting);
    	form.init();

    	var id='${param.id}';
    	if(id!=null&&id!=""){
    	   form.loadData(id, "QhDemo");
    	}

		ajustHeight();
    });

    var $$ = function(func){
        if (document.addEventListener) {
            window.addEventListener("load", func, false);
        }
        else if (document.attachEvent) {
            window.attachEvent("onload", func);
        }
    }
    $$(function(){

    });

    //-->
</SCRIPT>
</head>

<body>
<ul class=tab_nav>
  <li>
    <a href="/qh/public/common/r2.htmls?page=demo/demo_list">试玩赚钱</a>
  </li>
  <li>
    <a class="current" href="">新建试玩</a>
  </li>
</ul>
<div class="contrainer">
<div id="formview0" class="rbox1"></div>
<div id="formview" class="rbox1" style="margin-top:10px;"></div>
<div id="list" class="rbox2"></div>
<div id="fmUploadImg" style="display:none">
    <form method="post" enctype="multipart/form-data" name="form1" id="form1">
        <table>
            <tr>
                <td style="padding:20px 0 0 20px;">
                    <input type="file" name="userfile" id="inputImg" />
                </td>
            </tr>
        </table>
    </form>
</div>
<div id="fmUploadFile" style="display:none">
    <form method="post" enctype="multipart/form-data" id="formFile">
        <table>
            <tr>
                <td style="padding:20px 0 0 20px;">
                    <input type="file" name="userfile" />
                </td>
            </tr>
        </table>
    </form>
</div>
</div>
<script type="text/javascript" src="<%=path %>/static/js/underscore.js"></script>
<script type='text/javascript' src='<%=path %>/static/My97DatePicker/WdatePicker.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/interface/BaseDwr.js'></script>

</body>
</html>